<template>
    <div>
        <van-swipe v-if="banners.length > 0" class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item v-for="item in banners">
                <img v-lazy="item.img_url" alt="">
            </van-swipe-item>
        </van-swipe>
    </div>
</template>

<script>
    export default {
        name: "HomeSwiper",
        props: {
            banners: {
                type: Array,
                default() {
                    return [];
                }
            }
        }
    }
</script>

<style scoped lang="scss">
.my-swipe {
    img {
        width: 100%;
        height: 150px !important;
    }
}
</style>